package pl.edu.agh.student.janikhankus.tree;

/**
 * Class which represents epsylon
 * 
 * @author Jaroslaw Janik
 */
public class Epsylon extends Symbol {
	
	/**
	 * Default constructor
	 */
	public Epsylon() {
		super("Epsylon");
	}
	
	/**
	 * Returns object as instance of Espylon
	 */
	public Epsylon asEpsylon() {
		return this;
	}
	
	@Override
	public boolean equals(Object o){
		if((this != o) || !(o instanceof Symbol)){
			return false;
		}
		Symbol s = (Symbol)o;
		if(this == s){
			return true;
		}
		if(s.asEpsylon() != null ){
			return true;
		}
		return false;
	}
	
	@Override
	public int hashCode()
	{
		return (new Integer(4)).hashCode();
	}
}
